home *** CD-ROM | disk | FTP | other *** search
/ QRZ! Ham Radio 8 / QRZ Ham Radio Callsign Database - Volume 8.iso / pc / files / dsp / 56000tar.z / 56000tar / 56000 / flts / iir6.hlp < prev    next >
Text File  |  1991-11-26  |  3KB  |  92 lines

  1. 2 IIR6
  2.          Name: IIR6.ASM
  3.          Type: Assembler Macro
  4.       Version: 1.0
  5.  Date Entered:  15-Jul-87
  6.   Last Change:  15-Jul-87
  7.  
  8.   Description: Arbitrary Order Direct Canonic Filter
  9.  
  10.  This macro implements a direct form filter with a minimum
  11.  number of delay elements using looped code to allow a filter
  12.  of arbitrary order.
  13.  
  14.      Input                w(n)
  15.  x(n) >----(+)--------------------------(+)-----> Output
  16.             ^              |             ^        y(n)
  17.             |     a(1)    1/z    b(1)    |
  18.            (+)<-- 0.8 -----|---- 0.1 -->(+)
  19.             ^              v             ^
  20.             |     a(2)    1/z    b(2)    |
  21.            (+)<-- -0.7 ----|---- 0.2 -->(+)
  22.             ^              v             ^
  23.             |     a(3)    1/z    b(3)    |
  24.            (+)<-- 0.6  ----|---- 0.3 -->(+)
  25.             ^              v             ^
  26.             |     a(4)    1/z    b(4)    |
  27.            (+)<-- -0.5 ----|---- 0.4 -->(+)
  28.             ^              v             ^
  29.             |     a(5)    1/z    b(5)    |
  30.            (+)<-- 0.4  ----|---- 0.5 -->(+)
  31.  
  32.                  Direct Form Canonic Filter
  33.  
  34.   This filter is described by the difference equation:
  35.  
  36.  y(n)  =
  37.  x(n)  +  a(1)y(n-1)  +  a(2)y(n-2)  +  ...  +  a(r)y(n-r) +
  38.           b(1)x(n-1)  +  b(2)x(n-2)  +  ...  +  b(r)x(n-r)
  39.  
  40.  with z transform:
  41.  
  42.                       -1         -2               -r
  43.    Y(z)      1 + b(1)z    + b(2)z   +  ... + b(r)z
  44.  -------  =  --------------------------------------
  45.    X(z)               -1          -2              -r
  46.             1 - a(1)z    - a(2)z      ... - a(r)z
  47.  
  48.   where:
  49.     x(n)  = input sample at time nT
  50.     y(n)  = output of the filter at time nT
  51.     a(n)  = filter coefficient n (magnitude less than one)
  52.     b(n)  = filter coefficient n (magnitude less than one)
  53.       T   = sample period
  54.       r   = order of filter
  55.  
  56.   This filter can be described in terms of its "order" where the
  57.   order  of  the filter refers to the highest power of z in the
  58.   polynomial describing the system.  In this example, the filter
  59.   is a 5th order filter.
  60.  
  61.   The memory map for this filter is shown below.   
  62.  
  63.           r0          m0=order  (=5, mod 6)
  64.           |
  65.           v
  66.         -------------------------------------------
  67.    X:   |      |      |      |      |      |      | Filter States
  68.         |w(n)  |w(n-1)|w(n-2)|w(n-3)|w(n-4)|w(n-5)|
  69.         -------------------------------------------
  70.              
  71.  
  72.            r4       m4=2*order-1  (=9, mod 10)
  73.            |
  74.            v
  75.          ------------------------------------
  76.     Y:   |  a(1)| a(2) | a(3) | a(4) | a(5) |
  77.          |  .8  | -.7  |  .6  | -.5  |  .4  |
  78.          ------------------------------------
  79.  
  80.  
  81.          ------------------------------------
  82.          |  b(1)| b(2) | b(3) | b(4) | b(5) |
  83.          |  .1  | .2   | .3   | .4   | .5   |
  84.          ------------------------------------
  85.             
  86.       Memory Map for the Direct Form Canonic Filter
  87.  
  88.   For an example of how to use this filter see the
  89.   test program IIR6T.ASM
  90.  
  91.  
  92.